public class PersonsNames {
	public static void main(String[] args) {

		String array0 = "Jeff,Haneman";
		String array1 = "Bruce,Dickinson";
		String array2 = "Tom,Araya";
		String array3 = "Ozzy,Osbourne";

		int counter0 = 0;
		for (int i = 1; i < array0.length(); i++) {

			counter0++;

		}

		int counter1 = 0;
		for (int i = 1; i < array1.length(); i++) {

			counter1++;

		}

		int counter2 = 0;
		for (int i = 1; i < array2.length(); i++) {

			counter2++;

		}

		int counter3 = 0;
		for (int i = 1; i < array3.length(); i++) {

			counter3++;

		}

		System.out.println(array0 + "\tHas: " + counter0 + " letters");
		System.out.println(array1 + "\tHas: " + counter1 + " letters");
		System.out.println(array2 + "\tHas: " + counter2 + " letters");
		System.out.println(array3 + "\tHas: " + counter3 + " letters");

		int result;

		result = counter0;

		if (counter1 > result)
			result = counter1;
		if (counter2 > result)
			result = counter2;
		if (counter3 > result)
			result = counter3;

		System.out.println("\nThe longest name and surname has: " + result
				+ " letters");

		if (counter0 == result) {
			System.out.println(array0);
		}

		if (counter1 == result) {
			System.out.println(array1);
		}
		if (counter2 == result) {
			System.out.println(array2);
		}
		if (counter3 == result) {
			System.out.println(array3);
		}
	}
}
